home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / macabuse / imlib / include / tools.hpp < prev    next >
C/C++ Source or Header  |  1997-05-20  |  1KB  |  46 lines

  1. #ifndef __TOOLS_HPP_
  2. #define __TOOLS_HPP_
  3.  
  4. #include "jwindow.hpp"
  5. #include "input.hpp"
  6. #include "specs.hpp"
  7. #include "scroller.hpp"
  8. #include "visobj.hpp"
  9.  
  10. class tool_picker : public spicker
  11. {
  12.   filter *map;
  13.   visual_object **icons; 
  14.   int *ids;
  15.   int total_icons;
  16.   int iw,ih;
  17.   palette *old_pal;
  18.  
  19.   public :
  20.  
  21.   // you are expected keep image and id list in memory, tool_picker does not copy them
  22.   tool_picker(int X, int Y, int ID, 
  23.           int show_h, visual_object **Icons, int *Ids, int total_ic, 
  24.           palette *icon_palette, palette *pal, window_manager *wm, ifield *Next);
  25.  
  26.   virtual void draw_item(window_manager *wm, image *screen, int x, int y, int num, int active);
  27.   virtual int total() { return total_icons; }
  28.   virtual int item_width(window_manager *wm) { return iw; } 
  29.   virtual int item_height(window_manager *wm) { return ih; }
  30.   virtual void note_new_current(window_manager *wm, image *screen, input_manager *inm, int x) 
  31.   { wm->push_event(new event(ids[x],NULL)); }
  32.  
  33.   void remap(palette *pal, window_manager *wm, image *screen);
  34.   ~tool_picker();
  35. } ;
  36.  
  37.  
  38. #endif
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.